// 当作背包问题来解
/*dp[i][0]:出水，dp[i][1]:进水*/
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int MOD = 1e9 + 7;
const int N = 1000;
int n, sum, a, ans = 0;
LL dp[N][2];

int main()
{
	cin >> n;
	for (int i = 1; i <= n; i++)
	{
		cin >> a;
		sum += a;
	}
	int mid = sum / 2;
	for (int i = 1; i <= N; i++)
	{
		dp[i][0] += dp[i - 1][0];
		dp[i][1] += dp[i - 1][1];
	}
	for (int i = 1; i <= n; i++)
	{
		if (dp[i][0] == mid || dp[i][1] == mid)
		{
			ans++;
		}
	}
	cout << ans % MOD << endl;
	return 0;
}

